package Text0511;

public class Student {
    public String name;
    public int age;
    public String ID;
    public double math;
    private String IDNumber = "123";

    static String sta = "静态变量";

    static {
        System.out.println("静态代码块");
        System.out.println(sta);
    }

    {
        System.out.println("这是父类构造代码块");
    }

    public Student(String name,int age,String ID ){
        this.name = name;
        this.age = age;
        this.ID = ID;
        System.out.println("父类构造方法");
    }

    public Student() {
        this.name = null;
        this.age = 0;
        this.ID = null;
        System.out.println("父类构造方法");
    }

    public void show(){
        System.out.println("Student name:" + name + " age:" + age + " ID:" + ID);
    }

    public void setIN(double goal){
        math = goal;
        System.out.println("Student math:" + math);
    }

    public void setIN(String name, int age, String ID){
        this.name = name;
        this.age = age;
        this.ID = ID;
        System.out.println("修改后的Student信息");
    }

    public String getIDNumber(){
        return IDNumber;
    }
}
